<%@page import="com.thinkgem.jeesite.modules.ta.entity.StWorktime"%>
<%@page import="java.util.List"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>设置工作日</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	function show(a, y, m, d) {
		//获取选择的时间
		location.href = "/jeesite/a/ta/stWorktime/getWorktime?sdate=" + a
				+ "&year=" + y + "&month=" + m + "&date=" + d;
	}
</script>
</head>

<body>
	<jsp:useBean id="bean"
		class="com.thinkgem.jeesite.modules.ta.util.CanlendarFace" />
	<%
		String year, month, date;
			year = request.getParameter("year");
			month = request.getParameter("month");
			date = request.getParameter("date");
			List<StWorktime> list = (List<StWorktime>)request.getSession().getAttribute("list");
			out.println(bean.showHtml(year, month, date, list));
	%>
	<div align="center">
		<form id="inputForm" action="${ctx}/ta/stWorktime/save" method="post"
			class="form-horizontal">
			<sys:message content="${message}" />
			<table width="66%" class="table-striped table-bordered table-condensed" style="font-size: 14px;">
				<tr>
					<td>上午上班时间：</td>
					<td>
						<input name="mstime" type="text" readonly="readonly"
						style="width: 100px"
						maxlength="20"
						value="<fmt:formatDate value="${stWorktime.mstime}" pattern="HH:mm:ss"/>"
						class="Wdate"
						onclick="WdatePicker({dateFmt:'HH:mm:ss',isShowClear:false});" />
						到
						<input name="metime" type="text" readonly="readonly"
						style="width: 100px"
						maxlength="20"
						value="<fmt:formatDate value="${stWorktime.metime}" pattern="HH:mm:ss"/>"
						class="Wdate"
						onclick="WdatePicker({dateFmt:'HH:mm:ss',isShowClear:false});" />
					</td>
					<td>下午上班时间：
						<input name="nstime" type="text" readonly="readonly"
						style="width: 100px"
						maxlength="20"
						value="<fmt:formatDate value="${stWorktime.nstime}" pattern="HH:mm:ss"/>"
						class="Wdate"
						onclick="WdatePicker({dateFmt:'HH:mm:ss',isShowClear:false});" />
						到
						<input name="netime" type="text" readonly="readonly"
						style="width: 100px"
						maxlength="20"
						value="<fmt:formatDate value="${stWorktime.netime}" pattern="HH:mm:ss"/>"
						class="Wdate"
						onclick="WdatePicker({dateFmt:'HH:mm:ss',isShowClear:false});" />
					</td>
				</tr>
				<tr>
					<td>当前日期：</td>
					<td>
						<input name="sdate" id="xdate" type="text"
						style="width: 235px"
						readonly="readonly"
						value="<fmt:formatDate value="${stWorktime.sdate}" pattern="yyyy-MM-dd"/>"
						maxlength="20" class="input-medium Wdate "
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});" />
					</td>
					<td>日期类型：
						<input name='timelengh' checked="checked" type='radio'
						value="27000"
						<c:if test="${stWorktime.timelengh == '27000' }">checked="checked"</c:if> />
						工作日<input name='timelengh' type='radio' value="0"
						<c:if test="${stWorktime.timelengh == '0'}">checked="checked"</c:if> />假期
						<input type='submit'  class="btn btn-primary" value='保存设置' />
					</td>
				</tr>
				
			</table>
		</form>
		<table  width="65%" class="table-striped table-bordered table-condensed" style="font-size: 14px;">
			<tr>
				<td colspan="2">
					<div align="center">
						<form action="${ctx}/ta/stWorktime/setDays" method="post">
							<input name="date" type="hidden" value="<fmt:formatDate value="${stWorktime.sdate}" pattern="yyyy-MM-dd"/>" />往后
							<input name="days" style='width: 50px;' />天按此设置
							<input name="six" type='checkbox' value="6" />周六休息
							<input type='checkbox' name="zero" value="0" />周日休息
							<input type="submit"  class="btn btn-primary" value='批量生成' />
						</form>
					</div>
				</td>
			</tr>
		</table>
			
	</div>
</body>
</html>
